package jgl.vajra.operator.part.order.model;

import java.util.Map;

import io.reactivex.Observable;
import jgl.vajra.operator.bean.GrabOrdersBean;
import jgl.vajra.operator.manager.AccountManager;
import jgl.vajra.operator.part.order.contract.GrabDetailsContract;
import jgl.vajra.operator.widget.manager.RxJavaHttpManager;
import jgl.vajra.operator.widget.manager.retrofit.RetrofitJsonManager;
import jgl.vajra.operator.widget.utils.UIUtils;

public class GrabDetailsModel extends GrabDetailsContract.Model{
    @Override
    public Observable<GrabOrdersBean> getGrabOrdersData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getGrabOrdersData(map, AccountManager.getInstance().getLoginData(UIUtils.getContext()).authorization)
                .compose(RxJavaHttpManager.applyTransformer());
    }
}
